﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace HerGoS.Administration.Entities
{
   public class HGSContext
    {
        public static Usuario Usuario 
        {
            get
            {
                if (HttpContext.Current.Session["usuario"] == null)
                    HttpContext.Current.Session["usuario"] = new Usuario();

                return HttpContext.Current.Session["usuario"] as Usuario;
            }
            set
            {
                HttpContext.Current.Session["usuario"] = value;
            }
        }

        public static Permisos Permisos
        {
            get
            {
                if (HttpContext.Current.Session["permisos"] == null)
                    HttpContext.Current.Session["permisos"] = new Permisos();

                return HttpContext.Current.Session["permisos"] as Permisos;
            }
            set
            {
                HttpContext.Current.Session["permisos"] = value;
            }
        }

    }
}
